package br.unifor.ed.nodes;

public class DoubleNode<E> {
	private E data;
	private DoubleNode<E> next, previous;

	public DoubleNode() {
		this(null, null, null);
	}

	public DoubleNode(E data) {
		this(data, null, null);
	}

	public DoubleNode(E data, DoubleNode<E> next, DoubleNode<E> previous) {
		super();
		setData(data);
		setNext(next);
		setPrevious(previous);
	}

	public void setPrevious(DoubleNode<E> previous) {
		this.previous = previous;

	}

	public DoubleNode<E> getPrevious() {
		return previous;
	}

	public E getData() {
		return data;
	}

	public void setData(E data) {
		this.data = data;
	}

	public DoubleNode<E> getNext() {
		return next;
	}

	public void setNext(DoubleNode<E> next) {
		this.next = next;
	}
}
